<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>产品管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
</head>
<body>
<div class="container">
<form action="module.php?m=product&s=product_unify.php" method="post" name="unify" id="unify">
<{if $smarty.get.type=='limit'}>
<table class="table3">
	<tbody>
        <tr>
            <td colspan="99">
                <ul class="tips">
                    <li>不可输入小数点、负数和非数字内容。</li>
                    <li>"直接修改"是指将所选商品的限购数量统一修改为某个值。</li>
                    <li>"公式调整"是指在每个商品原有限购数量的基础上同幅度增加或者同幅度减少。</li>
                </ul>
            </td>
        </tr>
	</tbody>
 
    <tbody>
	<tr>
    	<td width="80">
        	<input type="radio" name="type" value="1" id="s1" checked><label for="s1">直接修改</label>
        </td>
        <td width="60">限购数量</td>
        <td width="10">=</td>
        <td colspan="2"><input type="text" name="buy_limit_nums_1" value="" /></td>
    </tr>
	<tr>
    	<td><input type="radio" name="type" value="2" id="s2"><label for="s2">公式调整</label></td>
        <td>限购数量</td>
        <td>=</td>
        <td width="90">
        当前
        <select name="fun">
        	<option value="+">+</option>
        	<option value="-">-</option>
        </select>
        </td>
        <td><input type="text" name="buy_limit_nums_2" value="" /></td>
    </tr>
    </tbody>
	<tr>
    	<td colspan="99"><input type="button" id="unify_buttom" class="submit" value="保存"></td>
    </tr>
</table>
<input type="hidden" name="act" value="limit">
<{elseif $smarty.get.type=='price'}>
<table class="table3">
	<tbody>
        <tr>
            <td colspan="99">
                <ul class="tips">
                    <li>小技巧：直接修改：对所选商品的某个价格进行统一修改。</li>
                    <li>公式调价：将所选商品的某个价格修改为在另一个价格的基础上加减乘一个数字。</li>
                </ul>
            </td>
        </tr>
	</tbody>
 
    <tbody>
	<tr>
    	<td width="80">
        	<input type="radio" name="type" value="1" id="s1" checked><label for="s1">直接修改</label>
        </td>
        <td width="70">
        <select name="name">
        	<option value="price">销售价</option>
        	<option value="market_price">市场价</option>
        	<option value="cost_price">成本价</option>
        </select>
        </td>
        <td width="10">=</td>
        <td colspan="2"><input type="text" name="price1" value="" /></td>
    </tr>
	<tr>
    	<td><input type="radio" name="type" value="2" id="s2"><label for="s2">公式修改</label></td>
        <td>
        <select name="name1">
        	<option value="price">销售价</option>
        	<option value="market_price">市场价</option>
        	<option value="cost_price">成本价</option>
        </select>
        </td>
        <td>=</td>
        <td width="120">
        <select name="name2">
        	<option value="price">销售价</option>
        	<option value="market_price">市场价</option>
        	<option value="cost_price">成本价</option>
        </select>
        <select name="fun">
        	<option value="+">+</option>
        	<option value="-">-</option>
        	<option value="*">*</option>
        </select>
        </td>
        <td><input type="text" name="price2" value="" /></td>
    </tr>
    </tbody>
	<tr>
    	<td colspan="99"><input type="button" id="unify_buttom" class="submit" value="保存"></td>
    </tr>
</table>
<input type="hidden" name="act" value="price">
<{elseif $smarty.get.type=='price'}>
<table class="table3">
    <tbody>
        <tr>
            <td colspan="99">
                <ul class="tips">
                    <li>不可输入小数点、负数和非数字内容。</li>
                    <li>"直接修改"是指将所选商品的限购数量统一修改为某个值。</li>
                    <li>"公式调整"是指在每个商品原有限购数量的基础上同幅度增加或者同幅度减少。</li>
                </ul>
            </td>
        </tr>
    </tbody>
 
    <tbody>
    <tr>
        <td width="80">
            <input type="radio" name="type" value="1" id="s1" checked><label for="s1">直接修改</label>
        </td>
        <td width="60">限购数量</td>
        <td width="10">=</td>
        <td colspan="2"><input type="text" name="buy_limit_nums_1" value="" /></td>
    </tr>
    <tr>
        <td><input type="radio" name="type" value="2" id="s2"><label for="s2">公式调整</label></td>
        <td>限购数量</td>
        <td>=</td>
        <td width="90">
        当前
        <select name="fun">
            <option value="+">+</option>
            <option value="-">-</option>
        </select>
        </td>
        <td><input type="text" name="buy_limit_nums_2" value="" /></td>
    </tr>
    </tbody>
    <tr>
        <td colspan="99"><input type="button" id="unify_buttom" class="submit" value="保存"></td>
    </tr>
</table>
<input type="hidden" name="act" value="limit">
<{elseif $smarty.get.type=='price'}>
<table class="table3">
    <tbody>
     <tr>
                    <{foreach item=list key=num from=$firstvalue.d}>
                    <td><{$list.name}></td>
                    <{/foreach}>
                    <td>SKU</td>
                    <td>销售价</td>
                    <td>市场指导价</td>
                    <td>库存</td>
                    <td>限购数量</td>
                    <td>物流重量(千克)</td>
                </tr> 
    </tbody>
    <tr>
        <td colspan="99"><input type="button" id="unify_buttom" class="submit" value="保存"></td>
    </tr>
</table>
<{/if}>
<input type="hidden" name="id" value="<{$smarty.get.id}>">
</form>
<script>
$("#unify_buttom").click(function () {
	$('#unify').submit();
	return false;
});
</script>
</div>
</body>
</html>